package com.alan.server1;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.context.annotation.Configuration;

/**
 * Created by Alan on 17-8-22
 */
@EnableAutoConfiguration
@Configuration
@SpringBootApplication
@EnableDiscoveryClient          //通过该注解，实现服务发现，注册
@EnableCircuitBreaker           //开启断路器功能
@EnableHystrix                  //启动Hystrix 会有hystrix.stream接口,用于监控
//@EnableHystrixDashboard         //启用Hystrix Dashboard（仪表盘）功能
@EnableFeignClients             //启用注解请求
public class ServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(ServerApplication.class, args);
    }

}
